package com.allwees.bs.c.module.user.req;

import com.allwees.bs.core.modelbase.constant.ErrorMessage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
/**
 * 重置密码
 * @author jy2016
 *
 */
//@ApiModel(value = "重置密码实体")
public class ResetPasswordReq {

    @NotEmpty(message = ErrorMessage.PARAM_NOT_NULL)
//    @ApiModelProperty(value = "由接口返回的sid,主要做验证", example = "sid")
    private String sid;

    @NotEmpty(message = ErrorMessage.PARAM_NOT_NULL)
//    @ApiModelProperty(value = "要修改的账号", example = "test@mail.com")
    private String email;

    //密码的组成至少要包括大小写字母、数字及标点符号的其中两项
    @NotEmpty(message = ErrorMessage.PARAM_NOT_NULL)
    @Pattern(regexp = "^(?![A-Za-z]+$)(?!\\d+$)(?![\\W_]+$)\\S{8,16}$", message = ErrorMessage.PARAM_TYPE_NOT_MATCH)
//    @ApiModelProperty(value = "注册密码,密码的组成至少要包括大小写字母、数字及标点符号的其中两项", example = "a12345678")
    private String password;
}
